<!doctype html>
<html class="no-js">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>ClientBleGatt</title>
<link href="../../../images/logo-icon.svg" rel="icon" type="image/svg">    <script>var pathToRoot = "../../../";</script>
    <script>document.documentElement.classList.replace("no-js","js");</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
    if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    } else {
        const savedDarkMode = JSON.parse(storage)
        if(savedDarkMode === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    }
    </script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script>
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../styles/style.css" rel="Stylesheet">
<link href="../../../styles/main.css" rel="Stylesheet">
<link href="../../../styles/prism.css" rel="Stylesheet">
<link href="../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../styles/font-jb-sans-auto.css" rel="Stylesheet">
<script type="text/javascript" src="../../../scripts/clipboard.js" async></script>
<script type="text/javascript" src="../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../scripts/symbol-parameters-wrapper_deferred.js" defer></script></head>
<body>
    <div class="root">
<nav class="navigation" id="navigation-wrapper">
    <div class="navigation--inner">
        <div class="navigation-title">
            <button class="menu-toggle" id="menu-toggle" type="button">toggle menu</button>
            <div class="library-name">
<a class="library-name--link" href="../../../index.html">
                            Kotlin-BLE-Library
                    </a>            </div>
            <div class="library-version">
            </div>
        </div>
        <div class="filter-section" id="filter-section">
                <button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":client:dokkaHtmlPartial/release">androidJvm</button>
        </div>
    </div>
    <div class="navigation-controls">
        <button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
        <div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>
    </div>
</nav>
        <div id="container">
            <div class="sidebar" id="leftColumn">
                <div class="sidebar--inner" id="sideMenu"></div>
            </div>
            <div id="main">
<div class="main-content" data-page-type="classlike" id="content" pageids="client::no.nordicsemi.android.kotlin.ble.client.main.callback/ClientBleGatt///PointingToDeclaration//1399909096">
  <div class="breadcrumbs"><a href="../../index.html">client</a><span class="delimiter">/</span><a href="../index.html">no.nordicsemi.android.kotlin.ble.client.main.callback</a><span class="delimiter">/</span><span class="current">ClientBleGatt</span></div>
  <div class="cover ">
    <h1 class="cover"><span>Client</span><wbr><span>Ble</span><wbr><span><span>Gatt</span></span></h1>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">class </span><a href="index.html">ClientBleGatt</a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">gatt<span class="token operator">: </span><a href="../../../client-api/no.nordicsemi.android.kotlin.ble.client.api/-gatt-client-a-p-i/index.html">GattClientAPI</a><span class="token punctuation">, </span></span><span class="parameter ">scope<span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines/CoroutineScope///PointingToDeclaration/">CoroutineScope</span><span class="token punctuation">, </span></span><span class="parameter ">mutex<span class="token operator">: </span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.mutex/-mutex-wrapper/index.html">MutexWrapper</a><span class="token punctuation">, </span></span><span class="parameter ">bufferSize<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></span></span><span class="token punctuation">)</span></div><p class="paragraph">A class for managing BLE connection. It propagates events (<a href="../../../client-api/no.nordicsemi.android.kotlin.ble.client.api/-client-gatt-event/index.html">ClientGattEvent</a>) to it's corresponding characteristics (<a href="../../no.nordicsemi.android.kotlin.ble.client.main.service/-client-ble-gatt-characteristic/index.html">ClientBleGattCharacteristic</a>) and descriptors (<a href="../../no.nordicsemi.android.kotlin.ble.client.main.service/-client-ble-gatt-descriptor/index.html">ClientBleGattDescriptor</a>). Thanks to that values are getting updated.</p><p class="paragraph">Despite that it's responsible for exposing connection parameters like mtu, phy, connection state and request their changes.</p></div></div>
  </div>
  <div class="tabbedcontent">
    <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button></div>
    <div class="tabs-section-body">
      <div data-togglable="CONSTRUCTOR">
        <h2 class="">Constructors</h2>
        <div class="table"><a data-name="-94401740%2FConstructors%2F1399909096" anchor-label="ClientBleGatt" id="-94401740%2FConstructors%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-togglable="CONSTRUCTOR" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-client-ble-gatt.html"><span>Client</span><wbr><span>Ble</span><wbr><span><span>Gatt</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-94401740%2FConstructors%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">gatt<span class="token operator">: </span><a href="../../../client-api/no.nordicsemi.android.kotlin.ble.client.api/-gatt-client-a-p-i/index.html">GattClientAPI</a><span class="token punctuation">, </span></span><span class="parameter ">scope<span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines/CoroutineScope///PointingToDeclaration/">CoroutineScope</span><span class="token punctuation">, </span></span><span class="parameter ">mutex<span class="token operator">: </span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.mutex/-mutex-wrapper/index.html">MutexWrapper</a><span class="token punctuation">, </span></span><span class="parameter ">bufferSize<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></span></span><span class="token punctuation">)</span></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div data-togglable="TYPE">
        <h2 class="">Types</h2>
        <div class="table"><a data-name="-1357006746%2FClasslikes%2F1399909096" anchor-label="Companion" id="-1357006746%2FClasslikes%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-companion/index.html"><span><span>Companion</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1357006746%2FClasslikes%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">object </span><a href="-companion/index.html">Companion</a></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div data-togglable="PROPERTY">
        <h2 class="">Properties</h2>
        <div class="table"><a data-name="-1344633007%2FProperties%2F1399909096" anchor-label="bondState" id="-1344633007%2FProperties%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="bond-state.html"><span>bond</span><wbr><span><span>State</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1344633007%2FProperties%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">val </span><a href="bond-state.html">bondState</a><span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines.flow/StateFlow///PointingToDeclaration/">StateFlow</span><span class="token operator">&lt;</span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-bond-state/index.html">BondState</a><span class="token operator">?</span><span class="token operator">&gt;</span></div><div class="brief "><p class="paragraph">Returns bond state of the server device.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="663967916%2FProperties%2F1399909096" anchor-label="connectionState" id="663967916%2FProperties%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="connection-state.html"><span>connection</span><wbr><span><span>State</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="663967916%2FProperties%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">val </span><a href="connection-state.html">connectionState</a><span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines.flow/Flow///PointingToDeclaration/">Flow</span><span class="token operator">&lt;</span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-gatt-connection-state/index.html">GattConnectionState</a><span class="token operator">&gt;</span></div><div class="brief "><p class="paragraph">Returns last <a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-gatt-connection-state/index.html">GattConnectionState</a> without it's status.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-1972267916%2FProperties%2F1399909096" anchor-label="connectionStateWithStatus" id="-1972267916%2FProperties%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="connection-state-with-status.html"><span>connection</span><wbr><span>State</span><wbr><span>With</span><wbr><span><span>Status</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1972267916%2FProperties%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">val </span><a href="connection-state-with-status.html">connectionStateWithStatus</a><span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines.flow/StateFlow///PointingToDeclaration/">StateFlow</span><span class="token operator">&lt;</span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-gatt-connection-state-with-status/index.html">GattConnectionStateWithStatus</a><span class="token operator">?</span><span class="token operator">&gt;</span></div><div class="brief "><p class="paragraph">Returns last observed <a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-gatt-connection-state/index.html">GattConnectionState</a> with it's corresponding status <a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-ble-gatt-connection-status/index.html">BleGattConnectionStatus</a>.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-1109217664%2FProperties%2F1399909096" anchor-label="isConnected" id="-1109217664%2FProperties%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="is-connected.html"><span>is</span><wbr><span><span>Connected</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1109217664%2FProperties%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">val </span><a href="is-connected.html">isConnected</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></div><div class="brief "><p class="paragraph">Returns whether a device is connected.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="339103921%2FProperties%2F1399909096" anchor-label="mtu" id="339103921%2FProperties%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="mtu.html"><span><span>mtu</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="339103921%2FProperties%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/IntRange.html"><span class="token annotation builtin">IntRange</span></a><span class="token punctuation">(</span><span>from<span class="token operator"> = </span><span class="breakable-word"><span class="token constant">23</span></span><span class="token punctuation">, </span></span><wbr><span>to<span class="token operator"> = </span><span class="breakable-word"><span class="token constant">517</span></span></span><wbr><span class="token punctuation">)</span></div></div><span class="token keyword">val </span><a href="mtu.html">mtu</a><span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines.flow/StateFlow///PointingToDeclaration/">StateFlow</span><span class="token operator">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator">&gt;</span></div><div class="brief "><p class="paragraph">Established MTU size. There are incoming changes on Android 14 where this value is gonna to be always max value - 517 and wouldn't be able to change.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="695263613%2FProperties%2F1399909096" anchor-label="services" id="695263613%2FProperties%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="services.html"><span><span>services</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="695263613%2FProperties%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">val </span><a href="services.html">services</a><span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines.flow/StateFlow///PointingToDeclaration/">StateFlow</span><span class="token operator">&lt;</span><a href="../../no.nordicsemi.android.kotlin.ble.client.main.service/-client-ble-gatt-services/index.html">ClientBleGattServices</a><span class="token operator">?</span><span class="token operator">&gt;</span></div><div class="brief "><p class="paragraph">Returns <span data-unresolved-link="kotlinx.coroutines.flow/Flow///PointingToDeclaration/">Flow</span> which emits services. Services can be outdated which results in emitting <a href="../../../client-api/no.nordicsemi.android.kotlin.ble.client.api/-client-gatt-event/-service-changed/index.html">ServiceChanged</a>. That's why usage of <span data-unresolved-link="kotlinx.coroutines.flow/Flow///PointingToDeclaration/">Flow</span> may be handy.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div data-togglable="FUNCTION">
        <h2 class="">Functions</h2>
        <div class="table"><a data-name="-2110778922%2FFunctions%2F1399909096" anchor-label="abortReliableWrite" id="-2110778922%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="abort-reliable-write.html"><span>abort</span><wbr><span>Reliable</span><wbr><span><span>Write</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-2110778922%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">fun </span><a href="abort-reliable-write.html"><span class="token function">abortReliableWrite</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Aborts reliable write. All writes to a characteristics which supports reliable writes will be reverted to a state preceding call to <a href="begin-reliable-write.html">beginReliableWrite</a>.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1384940687%2FFunctions%2F1399909096" anchor-label="beginReliableWrite" id="1384940687%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="begin-reliable-write.html"><span>begin</span><wbr><span>Reliable</span><wbr><span><span>Write</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1384940687%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">fun </span><a href="begin-reliable-write.html"><span class="token function">beginReliableWrite</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Begins reliable write. All writes to a characteristics which supports this feature will be transactional which means that they can be reverted in case of data inconsistency.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-1024026108%2FFunctions%2F1399909096" anchor-label="clearServicesCache" id="-1024026108%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="clear-services-cache.html"><span>clear</span><wbr><span>Services</span><wbr><span><span>Cache</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1024026108%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">fun </span><a href="clear-services-cache.html"><span class="token function">clearServicesCache</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Clears service cache.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="2068001063%2FFunctions%2F1399909096" anchor-label="close" id="2068001063%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="close.html"><span><span>close</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="2068001063%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">fun </span><a href="close.html"><span class="token function">close</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Closes GATT instance and releases resources. After that <a href="index.html">ClientBleGatt</a> cannot be used.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-969204865%2FFunctions%2F1399909096" anchor-label="disconnect" id="-969204865%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="disconnect.html"><span><span>disconnect</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-969204865%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">fun </span><a href="disconnect.html"><span class="token function">disconnect</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Disconnects current device.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="907938964%2FFunctions%2F1399909096" anchor-label="discoverServices" id="907938964%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="discover-services.html"><span>discover</span><wbr><span><span>Services</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="907938964%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="discover-services.html"><span class="token function">discoverServices</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../../no.nordicsemi.android.kotlin.ble.client.main.service/-client-ble-gatt-services/index.html">ClientBleGattServices</a></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1805142747%2FFunctions%2F1399909096" anchor-label="executeReliableWrite" id="1805142747%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="execute-reliable-write.html"><span>execute</span><wbr><span>Reliable</span><wbr><span><span>Write</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1805142747%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">fun </span><a href="execute-reliable-write.html"><span class="token function">executeReliableWrite</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Executes reliable write. All writes to a characteristics which supports reliable write will be executed and new values will be set permanently.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="695040500%2FFunctions%2F1399909096" anchor-label="readPhy" id="695040500%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="read-phy.html"><span>read</span><wbr><span><span>Phy</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="695040500%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="read-phy.html"><span class="token function">readPhy</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-phy-info/index.html">PhyInfo</a></div><div class="brief "><p class="paragraph">Reads preferred PHY for the connection.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-1563139666%2FFunctions%2F1399909096" anchor-label="readRssi" id="-1563139666%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="read-rssi.html"><span>read</span><wbr><span><span>Rssi</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1563139666%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="read-rssi.html"><span class="token function">readRssi</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></div><div class="brief "><p class="paragraph">Suspend function reading server device's RSSI.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-833885272%2FFunctions%2F1399909096" anchor-label="reconnect" id="-833885272%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="reconnect.html"><span><span>reconnect</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-833885272%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">fun </span><a href="reconnect.html"><span class="token function">reconnect</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Reconnects to the device if disconnected. Works only if <a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-ble-gatt-connect-options/close-on-disconnect.html">BleGattConnectOptions.closeOnDisconnect</a> is set to false.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-689952921%2FFunctions%2F1399909096" anchor-label="requestConnectionPriority" id="-689952921%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="request-connection-priority.html"><span>request</span><wbr><span>Connection</span><wbr><span><span>Priority</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-689952921%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">fun </span><a href="request-connection-priority.html"><span class="token function">requestConnectionPriority</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">priority<span class="token operator">: </span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-ble-gatt-connection-priority/index.html">BleGattConnectionPriority</a></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Requests connection priority. It will influence latency and power consumption.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-442284678%2FFunctions%2F1399909096" anchor-label="requestMtu" id="-442284678%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="request-mtu.html"><span>request</span><wbr><span><span>Mtu</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-442284678%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="request-mtu.html"><span class="token function">requestMtu</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">mtu<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></div><div class="brief "><p class="paragraph">Suspend function requesting new MTU size.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="881336072%2FFunctions%2F1399909096" anchor-label="setPhy" id="881336072%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="set-phy.html"><span>set</span><wbr><span><span>Phy</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="881336072%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="set-phy.html"><span class="token function">setPhy</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">txPhy<span class="token operator">: </span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-ble-gatt-phy/index.html">BleGattPhy</a><span class="token punctuation">, </span></span><span class="parameter ">rxPhy<span class="token operator">: </span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-ble-gatt-phy/index.html">BleGattPhy</a><span class="token punctuation">, </span></span><span class="parameter ">phyOption<span class="token operator">: </span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-phy-option/index.html">PhyOption</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../../../core/no.nordicsemi.android.kotlin.ble.core.data/-phy-info/index.html">PhyInfo</a></div><div class="brief "><p class="paragraph">Sets preferred PHY for the connection.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="84045257%2FFunctions%2F1399909096" anchor-label="waitForBonding" id="84045257%2FFunctions%2F1399909096" data-filterable-set=":client:dokkaHtmlPartial/release"></a>
          <div class="table-row" data-filterable-current=":client:dokkaHtmlPartial/release" data-filterable-set=":client:dokkaHtmlPartial/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="wait-for-bonding.html"><span>wait</span><wbr><span>For</span><wbr><span><span>Bonding</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="84045257%2FFunctions%2F1399909096"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":client:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="wait-for-bonding.html"><span class="token function">waitForBonding</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">timeInMillis<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="token operator"> = </span><span class="token constant">2000</span></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Auxiliary function which waits for bonding. The bonding may be initiated in different scenarios e.g. after connected or when reading from characteristic which is protected.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
      <div class="footer">
        <span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
      </div>
            </div>
        </div>
    </div>
</body>
</html>

